﻿using LEDScreenLinkTool.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace LEDScreenLinkTool.Model
{
    /// <summary>
    /// 矩形灯板图形类,记录位置,用于绘制和响应
    /// </summary>
    public class ModuleGridItem: NotifyPropertyBase
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int ScreenId { get; set; }


        private double _width;
        /// <summary>
        /// 宽
        /// </summary>
        public double GridWidth {
            get { return _width; }
            set { _width = value; OnPropertyChanged(); }
        }

        private double _height;
        /// <summary>
        /// 高
        /// </summary>
        public double GridHeight {
            get { return _height; }
            set { _height = value; OnPropertyChanged(); }
        }

        private double _top;
        /// <summary>
        /// 位置Y
        /// </summary>
        public double GridTop {
            get { return _top; }
            set { _top = value; OnPropertyChanged(); }
        }

        private double _left;
        /// <summary>
        /// 位置X
        /// </summary>
        public double GridLeft {
            get { return _left; }
            set { _left = value; OnPropertyChanged(); }
        }

        /// <summary>
        /// 灯板类型 A 2*2;B 1*2; C 1*3
        /// </summary>
        public EModuleType ModuleType { get; set; }
    }

    /// <summary>
    /// 连线方案
    /// </summary>
    public class SolutionLine
    {
        /// <summary>
        /// 连线顺序(灯板编号)
        /// </summary>
        public List<int> GridNos;

        /// <summary>
        /// 灯板中心点
        /// </summary>
        public List<Point> Points;



        public SolutionLine()
        {
            GridNos = new List<int>();
            Points = new List<Point>();
        }
    }
}
